package com.kexinde.wjifen.model;

import java.util.Date;

import javax.persistence.Entity;

/**
 * 优惠活动评论
 * 
 * @author WEI
 *
 */
@Entity
public class Activitycomment {

	/**
	 * 主键
	 */
	private Long id;
	
	/**
	 * 评论时间
	 */
	private Date time = new Date();
	
	/**
	 * 优惠活动id（外键）
	 */
	private Long activityId = 0L;
	
	/**
	 * 用户id（外键）
	 */
	private Long userId = 0L;
	
	/**
	 * 评论内容
	 */
	private String content = "";

	/**
	 * 构造方法
	 * 动态创建实例，用于数据库读写时，反射获取对象
	 * 
	 * @param id
	 * @param time
	 * @param activityId
	 * @param userId
	 * @param content
	 */
	public Activitycomment(Long id, Date time, Long activityId, Long userId,
			String content) {
		super();
		this.id = id;
		this.time = time;
		this.activityId = activityId;
		this.userId = userId;
		this.content = content;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Long getActivityId() {
		return activityId;
	}

	public void setActivityId(Long activityId) {
		this.activityId = activityId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	/**
	 * 用于测试
	 */
	@Override
	public String toString() {
		return "Activitycomment [id=" + id + ", time=" + time + ", activityId="
				+ activityId + ", userId=" + userId + ", content=" + content
				+ "]";
	}
	
}
